package com.hellowx.qydcdev.exception;

/**
 * Created on 2022/1/5.
 *
 * @author Hello WX
 */
public enum CustomExceptionType {

    /**
     * 自定义异常类型
     */
    USER_INPUT_EXCEPTION(400,"用户操作异常"),
    SYSTEM_EXCEPTION(500,"系统异常"),
    PERMISSION_EXCEPTION(401,"权限不足"),
    OTHER_EXCEPTION(666,"其他异常");

    /**
     * 错误码
     */
    private final int code;
    /**
     * 错误信息
     */
    private final String message;

    CustomExceptionType(int code, String message){
        this.code = code;
        this.message = message;
    }

    public int getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
